package com.ruoyi.project.util;


import org.springframework.stereotype.Service;

@Service
public class AopService {
    @LogScheduledApiRequest
    public  <T> T sendUrl(String url, String name, String json, Class<T> tClass) {
        T rest = null;
        try {
            rest = RestTemplateUtil.rest(url, RestTemplateUtil.APPLICATION_JSON, json, tClass);
        } catch (Exception e) {
            throw new RuntimeException(e.getMessage().toString());
        }
        return rest;
    }
}
